<!--
 * @Author: xiuquanxu
 * @Company: kaochong
 * @Date: 2021-01-07 20:43:27
 * @LastEditors: xiuquanxu
 * @LastEditTime: 2021-01-07 21:12:55
-->
<!-- 相关文章：https://www.trickyedecay.me/2019/03/17/how-to-setup-an-live-server-with-nginx-base-on-http-flv/ -->
<html>
    <meta charset="utf-8">
    <body>
        <video controls id="videoElement"></video>
    </body>
    <!-- https://d.ossrs.net:8088/live/livestream.flv -->
    <script></script>
    <script src="http://bilibili.github.io/flv.js/dist/flv.js"></script>
    <script>
        if (flvjs.isSupported()) {
            var videoElement = document.getElementById('videoElement');
            var flvPlayer = flvjs.createPlayer({
                type: 'flv',
                // url: 'https://d.ossrs.net:8088/live/livestream.flv'
                url: 'http://localhost:8080/live?port=9999&app=myapp&stream=mystream',
            });
            flvPlayer.attachMediaElement(videoElement);
            flvPlayer.load();
            flvPlayer.play();
        }
    </script>
</html>